package com.jishuo.test;

import com.google.gson.Gson;
import com.jishuo.base.util.MD5;
import com.jishuo.pzk.bean.bill.BankBalanceDetail;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Description: java测试类
 * Author: jingcaiqi1225@gmail.com
 * Date: 2024/5/17 14:26
 */
public class testJava {
    public static void main(String[] args) {
        String s = MD5.md5s("yaoweiqi666");
        System.out.println("密码打印：" + s);

        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println("当前时间：" +format.format(new Date()));

        BankBalanceDetail dto = new BankBalanceDetail();
        dto.setFund("10");
        dto.setAccountCode("6222023002034512456");
        dto.setAccountDate("2024-05-20");
        dto.setBankId("10001");
        dto.setBankName("中国工商银行");
        dto.setAccountName("王小明");
        System.out.println("对象打印：" + dto);
        String json = new Gson().toJson(dto);
        System.out.println("json打印：" + json);

        BankBalanceDetail bankBalanceDetail = new Gson().fromJson(json, BankBalanceDetail.class);
        System.out.println("json转对象打印：" + bankBalanceDetail);
    }
}
